package com.gitee.funcy.multiple.datasource.datasource;

import lombok.extern.slf4j.Slf4j;

/**
 * ｛这里添加描述｝
 *
 * @author funcy
 * @date 2019-09-29 10:03
 */
@Slf4j
public class AppStorageContextHolder {

    private static final ThreadLocal<String> STORAGE = new ThreadLocal<>();


    /**
     * 设置app
     */
    public static void setApp(String dsType) {
        STORAGE.set(dsType);
    }

    /**
     * 获得app
     */
    public static String getApp() {
        return STORAGE.get();
    }

    /**
     * 移除app
     */
    public static void remove() {
        STORAGE.remove();
    }
}
